<script setup>
import { ref } from 'vue'
import SonCom from './components/SonCom.vue'

const msg = ref('我是来自父组件的数据')
</script>

<template>
  <!-- 结构 -->
  <div class="box">
    <h1>父组件</h1>
    <SonCom :msg="msg" />
    <button @click="msg += '!'">修改数据</button>
  </div>
</template>

<style scoped>
  .box{
    padding: 20px;
    border: 5px solid #000;
  }
</style>
